package com.example.pc.greenplants;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

public class ShengshihuaActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_shengshihua);

        //隐藏标题栏
        ActionBar actionBar = getSupportActionBar();
        if (actionBar!=null){
            actionBar.hide();
        }

        Button button1 = (Button) findViewById(R.id.button);
        Button button2 = (Button) findViewById(R.id.button2);
        Button button3 = (Button) findViewById(R.id.button3);
        button1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Intent intent = new Intent();
                intent.setData(Uri.parse("https://baike.baidu.com/item/生石花/725097"));
                intent.setAction(Intent.ACTION_VIEW);
                startActivity(intent);
            }
        });

        button2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Intent intent = new Intent();
                intent.setData(Uri.parse("https://sv.baidu.com/videoui/page/videoland?pd=bjh&context={\"nid\":\"16170292374312432121\",\"sourceFrom\":\"bjh\"}&fr=bjhauthor&type=video"));
                intent.setAction(Intent.ACTION_VIEW);
                startActivity(intent);
            }
        });


        button3.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Intent intent = new Intent();
                intent.setData(Uri.parse("https://ai.taobao.com/search/index.htm?pid=mm_26632325_6860397_107179700491&unid=&source_id=search&key=生石花&b=sousuo_ssk&clk1=967006e16989c8526f74f0489cb42480&prepvid=200_11.8.106.15_294144_1561799132124&spm=a231o.7712113%2Fg.a3342.1"));
                intent.setAction(Intent.ACTION_VIEW);
                startActivity(intent);
            }
        });

    }
}
